/*初始化swiper*/
function initSwiper () {
  var swiper = new Swiper ('.swiper-container', {
                    pagination: '.swiper-pagination',
                    paginationClickable: true,
                    direction: 'horizontal',
                    autoplay: 5000,
                    scrollbarHide: true, 
                    loop: true,
                    // effect: 'fade',
                    // onTap: function(swiper, event) {
                    //   if (swiper.clickedIndex == undefined) return;
                    //   window.location.href = "./html/newsDetail.html?id=" + encodeURIComponent(ysuHomeNews.top.list[swiper.clickedIndex - 1].url);
                    // },
                  });
}

/*页面加载完成*/
$(document).ready(function() {
  initSwiper();
});